package ai.yue.open.service.cd.config;

import ai.yue.library.data.mybatis.provider.AuditDataProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Mybatis配置
 *
 * @author 石昊
 * @since 2022/12/29
 */
@Configuration
public class MybatisConfig {

    @Bean
    public AuditDataProvider auditUserProvider() {
        return new AuditDataProvider() {
            @Override
            public String getUser() {
                // TODO 用户token
                return "default";
            }

            @Override
            public Long getUserId() {
                return 0L;
            }

            @Override
            public String getTenantSys() {
                return null;
            }

            @Override
            public String getTenantCo() {
                return null;
            }
        };
    }

}
